# for in 循环 格式1
from argparse import _ActionsContainer

for i in range(1,10):
    for t in range(1,i+1):
        print('{} * {} = {:^3}'.format(i,t,i*t),end='')
    print('')

# for in 循环 格式2
for i in range(9,0,-1):
    for t in range(1,i+1):
        print('{} * {} = {:^3}'.format(i, t, i * t), end='')
    print('')

# for in 循环 格式3
for i in range(1,10):
    for k in range(1,10-i):
        print(end =" "*11 )
    for t in range(1,i+1):
        print('{} * {} = {:^3}'.format(i, t, i * t), end='')
    print('')

# for in 循环 格式4
for i in range(1,10):
    for k in range(0,i):
        if k ==0:
            continue
        print(end =" "*11 )
    for t in range(i,10):
        print('{} * {} = {:^3}'.format(i, t, i * t), end='')
    print('')

# while 循环 格式1
i = 1
while i <=9:
    j = 1
    while j <= i:
        print('{} * {} = {:^3}'.format(i, j, i * t), end='')
        j += 1
    print('')
    i += 1

# while 循环 格式2
i = 9
while i >= 1:
    j = 1
    while j <=i:
        print('{} * {} = {:^3}'.format(i, j, i * t), end='')
        j += 1
    print('')
    i -= 1

# while 循环 格式3
i = 1
while i<=9:
    j = 9-i
    while j>=1:
        print(end = ' '*11)
        j -= 1
    k = 1
    while k<=i:
        print('{} * {} = {:^3}'.format(i, k, i * k), end='')
        k += 1
    print('')
    i += 1

# while 循环 格式4
i = 9
while i>=1:
    j = 9-i
    while j>=1:
        print(end = ' '*11)
        j -= 1
    k = 1
    while k<=i:
        print('{} * {} = {:^3}'.format(i, k, i * k), end='')
        k += 1
    print('')
    i -= 1



